{extend name="default/base/base_seller" /}
{block name="seller_main"}
<style>

    .content {
        overflow: inherit !important;
    }
    .content img {
        transition-duration:0.5s;
    }
    .content img:hover {
        transform: scale(2);
    }
    .content .imageframe {
        width: 200px;
        height: 113px;
        overflow: hidden;

    }

</style>

<div class="dssc-flow-layout">
    <div class="dssc-flow-container">
        <div class="title">
            <h3>退换货服务</h3>
        </div>
        <div id="saleRefundreturn">
            <div class="dssc-flow-step">
                <!-- <dl class="step-first current">
                    <dt>{$Think.lang.application_return}</dt>
                    <dd class="bg"></dd>
                </dl>
                <dl class="{if $return.seller_time > 0}current{/if}">
                    <dt>{$Think.lang.merchants_process_applications_returns}</dt>
                    <dd class="bg"> </dd>
                </dl>
                <dl class="{if $return.ship_time>0 || $return.return_type==1 }current{/if}">
                    <dt>{$Think.lang.buyers_return_goods_merchants}</dt>
                    <dd class="bg"> </dd>
                </dl>
                <dl class="{if $return.admin_time>0}current{/if}">
                    <dt>{$Think.lang.confirm_goods}</dt>
                    <dd class="bg"> </dd>
                </dl> -->
            </div>
            <div class="dssc-form-default">
                <h3>买家退换货申请</h3>
                <dl>
                    <dt>订单编号：</dt>
                    <dd>{$return.order_sn} </dd>
                </dl>
                <dl>
                    <dt>退换货编号：</dt>
                    <dd>{$return.refund_sn} </dd>
                </dl>
                <dl>
                    <dt>{$Think.lang.applicant_buyers}：</dt>
                    <dd>{$return.buyer_name}</dd>
                </dl>
                <dl>
                    <dt>商品&商品名称：</dt>
                    <dd>{$return.goods_name}</dd>
                    <dd><img  style="margin-left: 120px;width: 130px;height: 100px;"  src="{$http_name}/{$return.goods_image}" /></dd>
                </dl>
                <dl>
                    <dt>商品数量：</dt>
                    <dd>{$return.goods_num}</dd>
                </dl>
                <dl>
                    {if $return.refund_type == 2}
                    <dt>{$Think.lang.return_buyer_message}{$Think.lang.ds_colon}</dt>
                    {else if/}
                    <dt>换货原因{$Think.lang.ds_colon}</dt>
                    {/if}
                    <dd> {$return.reason_info} </dd>
                </dl>
                {if $return.refund_type == 2}
                <dl>
                    <dt>{$Think.lang.refund_amount}：</dt>
                    <dd>{$Think.lang.currency}{$return.refund_amount} </dd>
                </dl>
                {/if}
                <dl>
                    {if $return.refund_type == 2}
                    <dt>{$Think.lang.return_instructions}：</dt>
                    {else if/}
                    <dt>换货说明{$Think.lang.ds_colon}</dt>
                    {/if}
                    <dd> {$return.buyer_message} </dd>
                </dl>
                <dl class="size-56x56 content">
                    <dt>{$Think.lang.credentials_upload}：</dt>
                    <dd  class="size-56x56 content">
                        {notempty name="apply_images"}
                            {foreach name="apply_images" item="val" key="key" }
                            <img style="width: 150px;height: 130px;" class="show_image" src="{$val}">
                            {/foreach}
                        {/notempty}
                    </dd>
                </dl> 


                <form id="post_form" method="post" action="{:url('Sellerreview/edit',['return_id'=>$return.refund_id])}">
                    <h3>{$Think.lang.business_processing}</h3>
                    <dl>
                        <dt><i class="required">*</i>{$Think.lang.return_seller_confirm}{$Think.lang.ds_colon}</dt>
                        <dd>
                            <div>
                                <label class="mr20">
                                    <select name="seller_state" id="seller_state">
                                        <option value="2">同意</option>
                                        <option value="3">拒绝</option>
                                    </select>
                                </label>
                            </div>
                            <div class="mt10">
                                <label>
                                   
                            </div>
                            <span class="error"></span>
                        </dd>
                    </dl>
                    <dl id="wuliu_code">
                        <dt><i class="required">*</i>审核备注{$Think.lang.ds_colon}</dt>
                        <dd>
                            <textarea id="seller_message" name="seller_message" rows="2" class="textarea w300"></textarea>
                            <span class="error"></span>
                            <p class="hint"> <br>
                            </p>
                        </dd>
                    </dl>
                    <div class="bottom">
                        <a style="margin-top: 20px;margin-bottom: 20px;" class="submit" id="confirm_button">{$Think.lang.ds_ok}</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
    {include file="default/seller/sellerrefund/seller_refund_right" /}
</div>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8">
</script>
<script type="text/javascript">
    
    $(function() {
        $('#seller_state').change(function() {
            //alert($(this).val());return false;
            if ($(this).val() == '2') {
                $('#wuliu_code').show();
            } else {
                $('#wuliu_code').show();
            }
        });
    });

    $(function () {
        $("#confirm_button").click(function () {
            var status = $('#seller_state').val();
            var no_content = $('#seller_message').val();
            if(no_content.replace(/\s+/g,"") == ''){
               layer.msg('请填写备注信息');return false;
            }
            $("#post_form").submit();
        });
        $('#post_form').validate({
            errorPlacement: function (error, element) {
                error.appendTo(element.parentsUntil('dl').find('span.error'));
            },
            submitHandler: function (form) {
                ds_ajaxpost('post_form', 'url', "{:url('Sellerreview/index',['lock'=>$return.order_lock])}");
            },
            rules: {
                seller_state: {
                    required: true
                },
            },
            messages: {
                seller_state: {
                    required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.return_seller_confirm_null}'
                },
            }
        });
    });
</script>




{/block}
